package com.mt.roll.empty.vo;

import com.mt.roll.core.base.BaseVo;
import com.mt.roll.core.base.ITree;
import com.mt.roll.core.vo.PageVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * TODO 根据实际情况是否需要实现ITree接口
 *
 * @author jiff
 * @date 2020/12/22
 * @since 1.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Builder
@ApiModel(value = "xx视图对象", description = "用于查询xx信息")
public class EmptyVo extends BaseVo implements PageVo.ConvertVo, ITree<EmptyVo> {
    /**
     * 主键，自增
     */
    @ApiModelProperty(value = "主键", required = true, example = "1")
    @NotNull(message = "ID不能为空")
    private Long id;
    /**
     * 父xxID
     */
    @ApiModelProperty(value = "父xxID", example = "0")
    @NotNull(message = "父xx不能为空")
    private Long parentId;
    /**
     * 子列表
     */
    @ApiModelProperty(value = "子列表，用于获取xx树时才有数据", required = false)
    private List<EmptyVo> children;
}
